//
//  YJCBasicController.m
//  xiangzhe
//
//  Created by lyt on 16/11/14.
//  Copyright © 2016年 com.dazhebao. All rights reserved.
//

#import "YJCBasicController.h"
#import "MJRefresh.h"
#import "YJCUserLogin.h"

@interface YJCBasicController ()<UITableViewDelegate,UITableViewDataSource>
///// 用户是否登录
//@property (nonatomic, assign) BOOL isLogin;

@end

@implementation YJCBasicController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupUI];

}

- (void)setupUI{
    
    _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
    [self.view addSubview:_tableView];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    
    
    MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(refresh)];
    self.tableView.mj_header = header;
    [header setTitle:@"刷新完成" forState:MJRefreshStateIdle];
    [header setTitle:@"松开后刷新" forState:MJRefreshStatePulling];
    [header setTitle:@"拼命刷新中" forState: MJRefreshStateRefreshing];
    header.lastUpdatedTimeLabel.hidden = YES;
    
    

}

- (void)refresh{
    
        [NSTimer scheduledTimerWithTimeInterval:2.0 repeats:NO block:^(NSTimer * _Nonnull timer) {
    
        }];
    [self.tableView.mj_header endRefreshing];
}


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"cellID ";
    
    return [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
}
@end
